// private 即使继承的子类也无法访问
// protected 是可以被子类继承的

abstract class Animal {
  private name: string = 'animal';
  protected size: string = '15';
  eat(food: string) {
    console.log(food);
  }

  abstract run(dis: number): void;
}

class Dog extends Animal {
  constructor() {
    super();
    console.log(this.size);
  }

  run(dis: number) {
    console.log(this);
  }
}

const ad = new Dog();